* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.score, .high-score {
    font-size: 1.2em;
    font-weight: bold;
    color: #2d3748;
}

#score, #high-score {
    color: #e53e3e;
}

#gameCanvas {
    border: 3px solid #4a5568;
    border-radius: 10px;
    background: #2d3748;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.controls {
    margin-top: 20px;
}

.control-info {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 0.9em;
}

.control-info p {
    margin: 5px 0;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#startBtn {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

#startBtn:hover {
    background: linear-gradient(45deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

#pauseBtn {
    background: linear-gradient(45deg, #ed8936, #dd6b20);
    color: white;
}

#pauseBtn:hover {
    background: linear-gradient(45deg, #dd6b20, #c05621);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.4);
}

#resetBtn, #restartBtn {
    background: linear-gradient(45deg, #e53e3e, #c53030);
    color: white;
}

#resetBtn:hover, #restartBtn:hover {
    background: linear-gradient(45deg, #c53030, #9c2626);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.game-over.show {
    display: block;
    animation: fadeInScale 0.5s ease-out;
}

.game-over h2 {
    color: #e53e3e;
    margin-bottom: 20px;
    font-size: 2em;
}

.game-over p {
    font-size: 1.3em;
    margin-bottom: 25px;
    color: #4a5568;
}

#finalScore {
    color: #e53e3e;
    font-weight: bold;
    font-size: 1.2em;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 200px;
        margin: 5px 0;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
}